<template>
    <#if ctrl.render??>
        ${ctrl.render.code}
    <#else>
        <div class="app-mob-list  app-mob-list-${ctrl.name}<#if ctrl.getPSSysCss()??><#assign singleCss = ctrl.getPSSysCss()> ${singleCss.getCssName()}</#if>">
            <mt-loadmore 
                ref="loadmore"
                :bottom-distance=10 
                :auto-fill="false">
                    <ul class="app-mob-list-ul">
                        <#if ctrl.getItemPSLayoutPanel()??>
                        <li v-for="item in items" :key="item.srfkey" class="app-mob-list-item">
                        <#assign layoutpanel = ctrl.getItemPSLayoutPanel()>
                            ${P.getCtrlCode(layoutpanel, 'CONTROL.html').code}
                        </li>
                        <#elseif ctrl.itemRender??>
                        <li v-for="item in items" :key="item.srfkey" class="app-mob-list-item">
                            ${ctrl.itemRender.code}
                        </li>
                        <#else>
                        <template v-if = "controlStyle != 'SWIPERVIEW'">
                            <li v-for="item in items" :key="item.srfkey" class="app-mob-list-item">
                            <!-- 列表视图样式 -->
                            <app-list-default :item="item" v-if="controlStyle.substring(0,8) === 'LISTVIEW'"></app-list-default>
                            <!-- 图标视图样式 -->
                            <app-icon-list :item="item" v-if="controlStyle === 'ICONVIEW'"></app-icon-list>
                            <!-- 图片滑动视图样式 -->
                            <app-card-list :item="item" v-if="controlStyle === 'SWIPERVIEW'"></app-card-list>
                            </li>
                        </template>
                        <template v-if = "controlStyle === 'SWIPERVIEW'">
                            <app-list-swipe :items="items"></app-list-swipe>
                        </template>
                        </#if>
                    </ul>
            </mt-loadmore>    
        </div>
    </#if>
    </template>